/**
 * 
 */
package smallChanges.statements;

import net.sourceforge.pmd.ast.AccessNode;

/**
 * @author jspacco
 *
 */
public class SCModifiers
{
	// modifiers
	private boolean isStatic;
	private boolean isFinal;
	private boolean isSynchronized;
	private boolean isVolatile;
	private boolean isTransient;
	private boolean isAbstract;
	private boolean isNative;
	
	public SCModifiers() {}
	
	/**
	 * @return the isStatic
	 */
	public boolean isStatic()
	{
		return isStatic;
	}
	/**
	 * @param isStatic the isStatic to set
	 */
	public void setStatic(boolean isStatic)
	{
		this.isStatic = isStatic;
	}
	/**
	 * @return the isFinal
	 */
	public boolean isFinal()
	{
		return isFinal;
	}
	/**
	 * @param isFinal the isFinal to set
	 */
	public void setFinal(boolean isFinal)
	{
		this.isFinal = isFinal;
	}
	/**
	 * @return the isSynchronized
	 */
	public boolean isSynchronized()
	{
		return isSynchronized;
	}
	/**
	 * @param isSynchronized the isSynchronized to set
	 */
	public void setSynchronized(boolean isSynchronized)
	{
		this.isSynchronized = isSynchronized;
	}
	/**
	 * @return the isVolatile
	 */
	public boolean isVolatile()
	{
		return isVolatile;
	}
	/**
	 * @param isVolatile the isVolatile to set
	 */
	public void setVolatile(boolean isVolatile)
	{
		this.isVolatile = isVolatile;
	}
	/**
	 * @return the isTransient
	 */
	public boolean isTransient()
	{
		return isTransient;
	}
	/**
	 * @param isTransient the isTransient to set
	 */
	public void setTransient(boolean isTransient)
	{
		this.isTransient = isTransient;
	}
	/**
	 * @return the isAbstract
	 */
	public boolean isAbstract()
	{
		return isAbstract;
	}
	/**
	 * @param isAbstract the isAbstract to set
	 */
	public void setAbstract(boolean isAbstract)
	{
		this.isAbstract = isAbstract;
	}
	public boolean isNative()
    {
        return isNative;
    }
    public void setNative(boolean isNative)
    {
        this.isNative = isNative;
    }

    public static SCModifiers createSCModifiers(AccessNode node)
	{
		SCModifiers result=new SCModifiers();
		if (node.isAbstract()) {
			result.setAbstract(true);
		}
		if (node.isFinal()) {
			result.setFinal(true);
		}
		if (node.isSynchronized()) {
			result.setSynchronized(true);
		}
		if (node.isStatic()) {
			result.setStatic(true);
		}
		if (node.isVolatile()) {
			result.setVolatile(true);
		}
		if (node.isTransient()) {
			result.setTransient(true);
		}
		if (node.isNative()) {
		    result.setNative(true);
		}
		return result;
	}
	
	
}
